home *** CD-ROM | disk | FTP | other *** search
/ Chip 2003 November / Chip_2003-11_cd1.bin / servis / tarylynn / tarylynn.exe / {app} / Help / Tarylynn.chm / common / src / default.js next >
Text File  |  2003-06-15  |  1KB  |  37 lines

  1. NS4 = (document.layers) ? true : false;
  2. MOZ = ((document.getElementById) && !(document.all)) ? true : false;
  3. // <
  4. MSIE4 = ((document.all) && (parseInt(navigator.appVersion) >= 4)) ? true : false;
  5.  
  6. // image swapping
  7.  
  8. bub = new cimg("common/i/b-bub.gif", "common/i/b-bub2.gif", "");
  9. tri = new cimg("common/i/b-tri.gif", "common/i/b-tri2.gif", "Back to the top");
  10. home = new cimg("common/i/b-arrow_l.gif", "common/i/b-arrow_l2.gif", "Back home");
  11. contents = new cimg("common/i/b-tri.gif", "common/i/b-tri2.gif", "Down to contents");
  12.  
  13. function cimg(offsrc, onsrc, alt)
  14. {
  15.     this.off = new Image();
  16.     this.off.src = offsrc;
  17.     this.on = new Image();
  18.     this.on.src = onsrc;
  19.     this.alt = alt;
  20. }
  21.  
  22. function TOn(curobj, type)
  23. {
  24.     folder = (MOZ == true) ? curobj.firstChild : document.all[curobj.sourceIndex + 1];
  25.  
  26.     folder.src = eval(type).on.src;
  27.     window.status = eval(type).alt;
  28. }
  29.  
  30. function TOff(curobj, type)
  31. {
  32.     folder = (MOZ == true) ? curobj.firstChild : document.all[curobj.sourceIndex + 1];
  33.  
  34.     folder.src = eval(type).off.src;
  35.     window.status = eval(type).alt;
  36. }
  37.